You can freeze the current color or pattern of any square by holding down the option key when you click on a rectangle. The border of that rectangle will then flash, showing you it's frozen.
When a rectangle is frozen, Flipper cannot change it's color or pattern. But neither can you, so be sure it's what you want.
You unfreeze a rectangle the same way you froze it, by clicking with the option key held down.
You also have a limited amount of freezes to use (shown at the bottom of the window), be careful with them.
Another aid is the Progression box along the bottom of the grid. When you select 'See Progression' from the Game menu, the Progression box will show you the order of the patterns or colors for the current level.